package com.minyifang.wcspf.work.ui.home.presenter;

import com.minyifang.wcspf.common.base.BasePresenter;
import com.minyifang.wcspf.common.config.network.Constants;
import com.minyifang.wcspf.common.config.network.RetrofitHelper;
import com.minyifang.wcspf.common.config.user.UserManager;
import com.minyifang.wcspf.work.model.HttpRespond;
import com.minyifang.wcspf.work.ui.home.view.HomePage4View;
import com.minyifang.wcspf.work.ui.home.view.TakeGoodsView;

import io.reactivex.functions.Consumer;
import okhttp3.MediaType;
import okhttp3.RequestBody;

public class HomePage4Presenter extends BasePresenter<HomePage4View> {
    public void getMyCenterPage() {
        RequestBody body = RequestBody.create(MediaType.parse("application/json"), Constants.getJsonData(null, UserManager.getInstance().getToken()).toString());
        addTask(RetrofitHelper.getInstance().getService().myCenterPage(body), stringHttpRespond -> {
            getView().showMyCenterPage(stringHttpRespond);
        });
    }

}
